<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="description" content="Bootstrap Admin App + jQuery"/>
    <meta name="keywords" content="app, responsive, jquery, bootstrap, dashboard, admin"/>
    <title>欢迎界面</title>
    <link rel="icon" href="../static/img/icon.png" th:href="@{/img/icon.png}" type="image/x-icon">

    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="../static/alt/bower_components/bootstrap/dist/css/bootstrap.min.css"
          th:href="@{/alt/bower_components/bootstrap/dist/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="../static/alt/bower_components/font-awesome/css/font-awesome.min.css"
          th:href="@{/alt/bower_components/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="../static/alt/bower_components/Ionicons/css/ionicons.min.css"
          th:href="@{/alt/bower_components/Ionicons/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" href="../static/alt/dist/css/AdminLTE.min.css" th:href="@{/alt/dist/css/AdminLTE.min.css}">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
      page. However, you can choose any other skin. Make sure you
      apply the skin class to the body tag so the changes take effect. -->
    <link rel="stylesheet" href="../static/alt/dist/css/skins/skin-blue.min.css"
          th:href="@{/alt/dist/css/skins/skin-blue.min.css}">
    <!-- Pace style -->
    <link rel="stylesheet" href="../static/alt/plugins/pace/pace.min.css" th:href="@{/alt/plugins/pace/pace.min.css}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <!-- Main Header -->
    <header class="main-header" th:fragment="header">
        <!-- Logo -->
        <a href="index.html" th:href="@{/index}" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>A</b>LT</span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>Admin</b>LTE</span>
        </a>

        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>
            <!-- Navbar Right Menu -->
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- Messages: style can be found in dropdown.less-->
                    <li class="dropdown messages-menu">
                        <!-- Menu toggle button -->
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-envelope-o"></i>
                            <span class="label label-success">4</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">你有 4 条新消息</li>
                            <li>
                                <!-- inner menu: contains the messages -->
                                <ul class="menu">
                                    <li><!-- start message -->
                                        <a href="#">
                                            <div class="pull-left">
                                                <!-- User Image -->
                                                <img src="../static/dist/img/user2-160x160.jpg"
                                                     th:src="@{/dist/img/user2-160x160.jpg}" class="img-circle"
                                                     alt="User Image">
                                            </div>
                                            <!-- Message title and timestamp -->
                                            <h4>
                                                运营团队
                                                <small><i class="fa fa-clock-o"></i> 5 分钟</small>
                                            </h4>
                                            <!-- The message -->
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                    <!-- end message -->
                                </ul>
                                <!-- /.menu -->
                            </li>
                            <li class="footer"><a href="#">查看所有消息</a></li>
                        </ul>
                    </li>

                    <!-- Notifications Menu -->
                    <li class="dropdown notifications-menu">
                        <!-- Menu toggle button -->
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-bell-o"></i>
                            <span class="label label-warning">10</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">你有 10 条通知</li>
                            <li>
                                <!-- Inner Menu: contains the notifications -->
                                <ul class="menu">
                                    <li><!-- start notification -->
                                        <a href="#">
                                            <i class="fa fa-users text-aqua"></i> 5 new members joined today
                                        </a>
                                    </li>
                                    <!-- end notification -->
                                </ul>
                            </li>
                            <li class="footer"><a href="#">查看所有</a></li>
                        </ul>
                    </li>

                    <!-- User Account Menu -->
                    <li class="dropdown user user-menu">
                        <!-- Menu Toggle Button -->
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <!-- The user image in the navbar-->
                            <img src="../static/alt/dist/img/user2-160x160.jpg"
                                 th:src="@{/alt/dist/img/user2-160x160.jpg}"
                                 class="user-image" alt="User Image">
                            <!-- hidden-xs hides the username on small devices so only the image appears. -->
                            <span class="hidden-xs" th:text="${user.username}">管理员</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- The user image in the menu -->
                            <li class="user-header">
                                <img src="../static/alt/dist/img/user2-160x160.jpg"
                                     th:src="@{/alt/dist/img/user2-160x160.jpg}"
                                     class="img-circle" alt="User Image">

                                <p>
                                    Alexander Pierce - Web Developer
                                    <small>Member since Nov. 2012</small>
                                </p>
                            </li>
                            <!-- Menu Body -->
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Followers</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Sales</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Friends</a>
                                    </div>
                                </div>
                                <!-- /.row -->
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">Profile</a>
                                </div>
                                <div id="logout" class="pull-right">
                                    <a href="login.html" th:href="@{/logout}" class="btn btn-default btn-flat">登出</a>
                                </div>
                            </li>
                        </ul>
                    </li>

                    <!-- Control Sidebar Toggle Button -->
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>

    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar" th:fragment="left">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel (optional) -->
            <div class="user-panel home">
                <div class="pull-left image">
                    <img src="../static/alt/dist/img/user2-160x160.jpg" th:src="@{/alt/dist/img/user2-160x160.jpg}"
                         class="img-circle" alt="User Image">
                </div>
            </div>

            <!-- search form (Optional) -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
              <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
              </button>
            </span>
                </div>
            </form>
            <!-- /.search form -->

            <!-- Sidebar Menu -->
            <ul class="sidebar-menu" data-widget="tree">
                <li th:each="mune : ${munes}" class="treeview">
                    <a href="javascript:void(0);">
                        <i class="fa fa fa-bar-chart-o" th:class="${mune.icon}"></i>
                        <span class="nav-label" th:text="${mune.text}"></span>
                        <span class="pull-right-container">
                            <i class="fa fa-angle-left pull-right"></i>
                        </span>
                    </a>

                    <ul class="treeview-menu">
                        <li th:each="cmune : ${mune.children}">
                            <a class="J_menuItem add-tab" href="javascript:void(0);" th:data-href="${cmune.href}"
                               th:data-tab-id="'tab-' + ${cmune.id}">
                                <i th:class="${cmune.icon}"></i>
                                <span th:text="${cmune.text}"></span>
                                <span class="pull-right-container"></span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
            <!-- /.sidebar-menu -->
        </section>
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div id="content" class="content-wrapper" th:fragment="content">
        <!-- Content Header (Page header) -->
        <!--<section class="content-header">
            <h1>
                Page Header
                <small>Optional description</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
                <li class="active">Here</li>
            </ol>
        </section>-->

        <!-- Main content -->
        <section class="content container-fluid">

            <!--------------------------
              | Your Page Content Here |
              -------------------------->
            <div id="tabpanel">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a href="#tab-1" data-toggle="tab">个人中心</a>
                        </li>
                    </ul>
                </div>
                <div class="tab-content">
                    <div id="tab-1" class="active tab-pane">
                        <div class="nav-tabs-custom">
                            <ul class="nav nav-tabs pull-right">
                                <li>
                                    <a href="#tab-pwd" data-toggle="tab">修改密码</a>
                                </li>
                                <li class="active">
                                    <a href="#tab-user-info" data-toggle="tab">个人信息</a>
                                </li>
                            </ul>
                        </div>
                        <div class="tab-content">
                        <div id="tab-user-info" class="box active tab-pane">
                            <div class="box-body">
                                <div class="col-sm-offset-1 col-sm-3">
                                    <div class="box box-main">
                                        <div class="box-body box-profile">
                                            <img src="../static/alt/dist/img/user2-160x160.jpg" id="avatarImg"
                                                 class="profile-user-img img-responsive img-circle"
                                                 th:src="@{/alt/dist/img/user2-160x160.jpg}">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-7">
                                    <div class="row">
                                        <div class="form-group">
                                            <label class="control-label col-sm-3" for="username">
                                                <!--<span class="required" aria-required="true">*</span>-->
                                                用户昵称：</label>
                                            <div class="col-sm-9 input-group">
                                                <input type="text" id="username" name="username" value="企鹅窝若群翁"
                                                       th:value="${user.username}"
                                                       maxlength="32" class="form-control"
                                                       aria-required="true">
                                                <span class="input-group-addon">
                                                <i class="fa fa-fw fa-user" style="margin-top:-2px;display:block;"></i>
                                            </span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-sm-3" title="" for="email">
                                                <!--<span class="required hide" aria-required="true">*</span>--> 电子邮箱：<i
                                                    class="fa icon-question hide"></i></label>
                                            <div class="col-sm-9 input-group">
                                                <input type="email" id="email" name="email" value="" maxlength="300"
                                                       th:value="${user.email}"
                                                       class="form-control email">
                                                <span class="input-group-addon"><i class="fa fa-fw fa-envelope"
                                                                                   style="margin-top:-2px;display:block;"></i></span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-sm-3" title="" for="mobile">
                                                <span class="required hide" aria-required="true">*</span> 手机号码：<i
                                                    class="fa icon-question hide"></i></label>
                                            <div class="col-sm-9 input-group">
                                                <input type="tel" id="mobile" name="mobile" value="18235106368"
                                                       th:value="${user.phone}"
                                                       maxlength="100" class="form-control mobile">
                                                <span class="input-group-addon">
                                                <i class="fa fa-fw fa-mobile"
                                                   style="margin-top:-2px;display:block;"></i>
                                            </span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-sm-3" title="" for="sign">
                                                <span class="required hide" aria-required="true">*</span> 个性签名：<i
                                                    class="fa icon-question hide"></i></label>
                                            <div class="col-sm-9 input-group">
                                            <textarea id="sign" name="sign" rows="3" maxlength="100"
                                                      class="form-control"></textarea>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-sm-3">上次登录：</label>
                                            <div class="col-sm-9 pt3 input-group">
                                                时间：${user.lastLoginDate} &nbsp; &nbsp; IP：${user.lastLoginIp}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                            <div id="tab-pwd" class="box tab-pane">

                            </div>
                        </div>
                    </div>
                </div>
            </div>


        </section>
        <!-- /.content -->
    </div>


    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark" th:fragment="sidebar">
        <!-- Create the tabs -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <li class="active"><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
            <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <!-- Home tab content -->
            <div class="tab-pane active" id="control-sidebar-home-tab">
                <h3 class="control-sidebar-heading">Recent Activity</h3>
                <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0);">
                            <i class="menu-icon fa fa-birthday-cake bg-red"></i>

                            <div class="menu-info">
                                <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>

                                <p>Will be 23 on April 24th</p>
                            </div>
                        </a>
                    </li>
                </ul>
                <!-- /.control-sidebar-menu -->

                <h3 class="control-sidebar-heading">Tasks Progress</h3>
                <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0);">
                            <h4 class="control-sidebar-subheading">
                                Custom Template Design
                                <span class="pull-right-container">
                    <span class="label label-danger pull-right">70%</span>
                  </span>
                            </h4>

                            <div class="progress progress-xxs">
                                <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
                            </div>
                        </a>
                    </li>
                </ul>
                <!-- /.control-sidebar-menu -->

            </div>
            <!-- /.tab-pane -->
            <!-- Stats tab content -->
            <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
            <!-- /.tab-pane -->
            <!-- Settings tab content -->
            <div class="tab-pane" id="control-sidebar-settings-tab">
                <form method="post">
                    <h3 class="control-sidebar-heading">General Settings</h3>

                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Report panel usage
                            <input type="checkbox" class="pull-right" checked>
                        </label>

                        <p>
                            Some information about this general settings option
                        </p>
                    </div>
                    <!-- /.form-group -->
                </form>
            </div>
            <!-- /.tab-pane -->
        </div>
    </aside>

    <!-- Main Footer -->
    <footer class="main-footer" th:fragment="footer">
        <!-- To the right -->
        <div class="pull-right hidden-xs">
            Anything you want
        </div>
        <!-- Default to the left -->
        <strong>Copyright &copy; 2018 <a href="#">Company</a>.</strong> All rights reserved.
    </footer>

    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
    immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
</div>

<!-- REQUIRED JS SCRIPTS -->

<!-- jQuery 3 -->
<script src="../static/alt/bower_components/jquery/dist/jquery.min.js"
        th:src="@{/alt/bower_components/jquery/dist/jquery.min.js}"></script>
<!-- Bootstrap 3.3.7 -->
<script src="../static/alt/bower_components/bootstrap/dist/js/bootstrap.min.js"
        th:src="@{/alt/bower_components/bootstrap/dist/js/bootstrap.min.js}"></script>
<!-- AdminLTE App -->
<script src="../static/alt/dist/js/adminlte.min.js" th:src="@{/alt/dist/js/adminlte.min.js}"></script>
<!-- PACE -->
<script src="../static/alt/bower_components/PACE/pace.min.js"
        th:src="@{/alt/bower_components/PACE/pace.min.js}"></script>


<script type="text/javascript">
    // To make Pace works on Ajax calls
    $(document).ajaxStart(function () {
        Pace.restart();
    });

    $('.home').click(function () {
        $('#content').load('/home');
        Pace.restart();
    });

    /*    $(function () {
            $('#logout').click(function () {
                $.ajax({
                    url: "/logout",
                    method: "delete"
                })
            })
        })*/
</script>

<!-- Optionally, you can add Slimscroll and FastClick plugins.
     Both of these plugins are recommended to enhance the
     user experience. -->


<!--<h3 th:text="|Welcome to our application, ${username}|"/>-->
<!--<span id="logout"><a href="javascript:void(0);">退出</a></span>-->
<!--<h3><a href="/token">退出</a></h3>-->
</body>
<!--<script>-->
<!--var logout = document.getElementById("logout");-->
<!--logout.addEventListener("click", function () {-->
<!--xmlhttp.open("GET", "/logout", true);-->
<!--xmlhttp.send();-->
<!--})-->
<!--</script>-->
</html>